﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace ChessOnline
{
    [ServiceContract]    
    public interface IChessOnlineService
    {
        [OperationContract]
        string LogIn(string user_name, string user_password);

        [OperationContract]
        string LogOut(string user_hash);

        [OperationContract]
        string IsAuthorized(string user_hash);

        [OperationContract]
        string Register(string user_name, string user_password);

        [OperationContract]
        List<GameInfo> GetGamesListAvailable(string user_hash);

        [OperationContract]
        string CreateNewGame(string user_hash);

        [OperationContract]
        string JoinGame(string user_hash, GameInfo game_info);

        [OperationContract]
        List<Coordinate> PickChess(string user_hash, string game_hash, Coordinate coord);

        [OperationContract]
        string MoveChess(string user_hash, string game_hash, Coordinate old_coord, Coordinate new_coord);

        [OperationContract]
        void QuitGame(string user_hash, string game_hash);

        [OperationContract]
        GameInfo UpdateGameInfo(string user_hash, string game_hash);

        [OperationContract]
        List<GameCell> UpdatePositions(string user_hash, string game_hash);

        [OperationContract]
        string GetEnemyName(string user_hash, string game_hash);
    }
}
